<?php

namespace App\Http\Controllers\Api\V1;

use App\B2BProject\Custom\Business\Brand;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class BrandController extends Controller
{
    public function index()
    {
        $brands = Brand::display()->get();

        $data = [];

        foreach ($brands as $brand) {
            $data[] = [
                'id'          => $brand->id,
                'name'        => $brand->name,
                'logo'        => url($brand->logo),
                'description' => $brand->description,
            ];
        }

        return success_return($data);
    }
}
